3.885 \(\int \frac {\sec ^3(c+d x) \tan ^4(c+d x)}{a+a \sin (c+d x)} \, dx\)

Optimal. Leaf size=150 \[ -\frac {\tan ^8(c+d x)}{8 a d}-\frac {\tan ^6(c+d x)}{6 a d}+\frac {3 \tanh ^{-1}(\sin (c+d x))}{128 a d}+\frac {\tan ^3(c+d x) \sec ^5(c+d x)}{8 a d}-\frac {\tan (c+d x) \sec ^5(c+d x)}{16 a d}+\frac {\tan (c+d x) \sec ^3(c+d x)}{64 a d}+\frac {3 \tan (c+d x) \sec (c+d x)}{128 a d} \]

[Out]

3/128*arctanh(sin(d*x+c))/a/d+3/128*sec(d*x+c)*tan(d*x+c)/a/d+1/64*sec(d*x+c)^3*tan(d*x+c)/a/d-1/16*sec(d*x+c)
^5*tan(d*x+c)/a/d+1/8*sec(d*x+c)^5*tan(d*x+c)^3/a/d-1/6*tan(d*x+c)^6/a/d-1/8*tan(d*x+c)^8/a/d

________________________________________________________________________________________

Rubi [A]  time = 0.23, antiderivative size = 150, normalized size of antiderivative = 1.00, number of steps used = 9, number of rules used = 6, integrand size = 29, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.207, Rules used = {2835, 2611, 3768, 3770, 2607, 14} \[ -\frac {\tan ^8(c+d x)}{8 a d}-\frac {\tan ^6(c+d x)}{6 a d}+\frac {3 \tanh ^{-1}(\sin (c+d x))}{128 a d}+\frac {\tan ^3(c+d x) \sec ^5(c+d x)}{8 a d}-\frac {\tan (c+d x) \sec ^5(c+d x)}{16 a d}+\frac {\tan (c+d x) \sec ^3(c+d x)}{64 a d}+\frac {3 \tan (c+d x) \sec (c+d x)}{128 a d} \]

Antiderivative was successfully verified.

[In]

Int[(Sec[c + d*x]^3*Tan[c + d*x]^4)/(a + a*Sin[c + d*x]),x]

[Out]

(3*ArcTanh[Sin[c + d*x]])/(128*a*d) + (3*Sec[c + d*x]*Tan[c + d*x])/(128*a*d) + (Sec[c + d*x]^3*Tan[c + d*x])/
(64*a*d) - (Sec[c + d*x]^5*Tan[c + d*x])/(16*a*d) + (Sec[c + d*x]^5*Tan[c + d*x]^3)/(8*a*d) - Tan[c + d*x]^6/(
6*a*d) - Tan[c + d*x]^8/(8*a*d)

Rule 14

Int[(u_)*((c_.)*(x_))^(m_.), x_Symbol] :> Int[ExpandIntegrand[(c*x)^m*u, x], x] /; FreeQ[{c, m}, x] && SumQ[u]
 &&  !LinearQ[u, x] &&  !MatchQ[u, (a_) + (b_.)*(v_) /; FreeQ[{a, b}, x] && InverseFunctionQ[v]]

Rule 2607

Int[sec[(e_.) + (f_.)*(x_)]^(m_)*((b_.)*tan[(e_.) + (f_.)*(x_)])^(n_.), x_Symbol] :> Dist[1/f, Subst[Int[(b*x)
^n*(1 + x^2)^(m/2 - 1), x], x, Tan[e + f*x]], x] /; FreeQ[{b, e, f, n}, x] && IntegerQ[m/2] &&  !(IntegerQ[(n
- 1)/2] && LtQ[0, n, m - 1])

Rule 2611

Int[((a_.)*sec[(e_.) + (f_.)*(x_)])^(m_.)*((b_.)*tan[(e_.) + (f_.)*(x_)])^(n_), x_Symbol] :> Simp[(b*(a*Sec[e
+ f*x])^m*(b*Tan[e + f*x])^(n - 1))/(f*(m + n - 1)), x] - Dist[(b^2*(n - 1))/(m + n - 1), Int[(a*Sec[e + f*x])
^m*(b*Tan[e + f*x])^(n - 2), x], x] /; FreeQ[{a, b, e, f, m}, x] && GtQ[n, 1] && NeQ[m + n - 1, 0] && Integers
Q[2*m, 2*n]

Rule 2835

Int[(cos[(e_.) + (f_.)*(x_)]^(p_)*((d_.)*sin[(e_.) + (f_.)*(x_)])^(n_.))/((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)]
), x_Symbol] :> Dist[1/a, Int[Cos[e + f*x]^(p - 2)*(d*Sin[e + f*x])^n, x], x] - Dist[1/(b*d), Int[Cos[e + f*x]
^(p - 2)*(d*Sin[e + f*x])^(n + 1), x], x] /; FreeQ[{a, b, d, e, f, n, p}, x] && IntegerQ[(p - 1)/2] && EqQ[a^2
 - b^2, 0] && IntegerQ[n] && (LtQ[0, n, (p + 1)/2] || (LeQ[p, -n] && LtQ[-n, 2*p - 3]) || (GtQ[n, 0] && LeQ[n,
 -p]))

Rule 3768

Int[(csc[(c_.) + (d_.)*(x_)]*(b_.))^(n_), x_Symbol] :> -Simp[(b*Cos[c + d*x]*(b*Csc[c + d*x])^(n - 1))/(d*(n -
 1)), x] + Dist[(b^2*(n - 2))/(n - 1), Int[(b*Csc[c + d*x])^(n - 2), x], x] /; FreeQ[{b, c, d}, x] && GtQ[n, 1
] && IntegerQ[2*n]

Rule 3770

Int[csc[(c_.) + (d_.)*(x_)], x_Symbol] :> -Simp[ArcTanh[Cos[c + d*x]]/d, x] /; FreeQ[{c, d}, x]

Rubi steps

\begin {align*} \int \frac {\sec ^3(c+d x) \tan ^4(c+d x)}{a+a \sin (c+d x)} \, dx &=\frac {\int \sec ^5(c+d x) \tan ^4(c+d x) \, dx}{a}-\frac {\int \sec ^4(c+d x) \tan ^5(c+d x) \, dx}{a}\\ &=\frac {\sec ^5(c+d x) \tan ^3(c+d x)}{8 a d}-\frac {3 \int \sec ^5(c+d x) \tan ^2(c+d x) \, dx}{8 a}-\frac {\operatorname {Subst}\left (\int x^5 \left (1+x^2\right ) \, dx,x,\tan (c+d x)\right )}{a d}\\ &=-\frac {\sec ^5(c+d x) \tan (c+d x)}{16 a d}+\frac {\sec ^5(c+d x) \tan ^3(c+d x)}{8 a d}+\frac {\int \sec ^5(c+d x) \, dx}{16 a}-\frac {\operatorname {Subst}\left (\int \left (x^5+x^7\right ) \, dx,x,\tan (c+d x)\right )}{a d}\\ &=\frac {\sec ^3(c+d x) \tan (c+d x)}{64 a d}-\frac {\sec ^5(c+d x) \tan (c+d x)}{16 a d}+\frac {\sec ^5(c+d x) \tan ^3(c+d x)}{8 a d}-\frac {\tan ^6(c+d x)}{6 a d}-\frac {\tan ^8(c+d x)}{8 a d}+\frac {3 \int \sec ^3(c+d x) \, dx}{64 a}\\ &=\frac {3 \sec (c+d x) \tan (c+d x)}{128 a d}+\frac {\sec ^3(c+d x) \tan (c+d x)}{64 a d}-\frac {\sec ^5(c+d x) \tan (c+d x)}{16 a d}+\frac {\sec ^5(c+d x) \tan ^3(c+d x)}{8 a d}-\frac {\tan ^6(c+d x)}{6 a d}-\frac {\tan ^8(c+d x)}{8 a d}+\frac {3 \int \sec (c+d x) \, dx}{128 a}\\ &=\frac {3 \tanh ^{-1}(\sin (c+d x))}{128 a d}+\frac {3 \sec (c+d x) \tan (c+d x)}{128 a d}+\frac {\sec ^3(c+d x) \tan (c+d x)}{64 a d}-\frac {\sec ^5(c+d x) \tan (c+d x)}{16 a d}+\frac {\sec ^5(c+d x) \tan ^3(c+d x)}{8 a d}-\frac {\tan ^6(c+d x)}{6 a d}-\frac {\tan ^8(c+d x)}{8 a d}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.67, size = 101, normalized size = 0.67 \[ \frac {\frac {-9 \sin ^6(c+d x)-9 \sin ^5(c+d x)+24 \sin ^4(c+d x)-72 \sin ^3(c+d x)-39 \sin ^2(c+d x)+25 \sin (c+d x)+16}{(\sin (c+d x)-1)^3 (\sin (c+d x)+1)^4}+9 \tanh ^{-1}(\sin (c+d x))}{384 a d} \]

Antiderivative was successfully verified.

[In]

Integrate[(Sec[c + d*x]^3*Tan[c + d*x]^4)/(a + a*Sin[c + d*x]),x]

[Out]

(9*ArcTanh[Sin[c + d*x]] + (16 + 25*Sin[c + d*x] - 39*Sin[c + d*x]^2 - 72*Sin[c + d*x]^3 + 24*Sin[c + d*x]^4 -
 9*Sin[c + d*x]^5 - 9*Sin[c + d*x]^6)/((-1 + Sin[c + d*x])^3*(1 + Sin[c + d*x])^4))/(384*a*d)

________________________________________________________________________________________

fricas [A]  time = 0.50, size = 167, normalized size = 1.11 \[ -\frac {18 \, \cos \left (d x + c\right )^{6} - 6 \, \cos \left (d x + c\right )^{4} + 36 \, \cos \left (d x + c\right )^{2} - 9 \, {\left (\cos \left (d x + c\right )^{6} \sin \left (d x + c\right ) + \cos \left (d x + c\right )^{6}\right )} \log \left (\sin \left (d x + c\right ) + 1\right ) + 9 \, {\left (\cos \left (d x + c\right )^{6} \sin \left (d x + c\right ) + \cos \left (d x + c\right )^{6}\right )} \log \left (-\sin \left (d x + c\right ) + 1\right ) - 2 \, {\left (9 \, \cos \left (d x + c\right )^{4} - 90 \, \cos \left (d x + c\right )^{2} + 56\right )} \sin \left (d x + c\right ) - 16}{768 \, {\left (a d \cos \left (d x + c\right )^{6} \sin \left (d x + c\right ) + a d \cos \left (d x + c\right )^{6}\right )}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(d*x+c)^7*sin(d*x+c)^4/(a+a*sin(d*x+c)),x, algorithm="fricas")

[Out]

-1/768*(18*cos(d*x + c)^6 - 6*cos(d*x + c)^4 + 36*cos(d*x + c)^2 - 9*(cos(d*x + c)^6*sin(d*x + c) + cos(d*x +
c)^6)*log(sin(d*x + c) + 1) + 9*(cos(d*x + c)^6*sin(d*x + c) + cos(d*x + c)^6)*log(-sin(d*x + c) + 1) - 2*(9*c
os(d*x + c)^4 - 90*cos(d*x + c)^2 + 56)*sin(d*x + c) - 16)/(a*d*cos(d*x + c)^6*sin(d*x + c) + a*d*cos(d*x + c)
^6)

________________________________________________________________________________________

giac [A]  time = 0.31, size = 136, normalized size = 0.91 \[ \frac {\frac {36 \, \log \left ({\left | \sin \left (d x + c\right ) + 1 \right |}\right )}{a} - \frac {36 \, \log \left ({\left | \sin \left (d x + c\right ) - 1 \right |}\right )}{a} + \frac {2 \, {\left (33 \, \sin \left (d x + c\right )^{3} - 87 \, \sin \left (d x + c\right )^{2} + 39 \, \sin \left (d x + c\right ) - 1\right )}}{a {\left (\sin \left (d x + c\right ) - 1\right )}^{3}} - \frac {75 \, \sin \left (d x + c\right )^{4} + 396 \, \sin \left (d x + c\right )^{3} + 786 \, \sin \left (d x + c\right )^{2} + 556 \, \sin \left (d x + c\right ) + 139}{a {\left (\sin \left (d x + c\right ) + 1\right )}^{4}}}{3072 \, d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(d*x+c)^7*sin(d*x+c)^4/(a+a*sin(d*x+c)),x, algorithm="giac")

[Out]

1/3072*(36*log(abs(sin(d*x + c) + 1))/a - 36*log(abs(sin(d*x + c) - 1))/a + 2*(33*sin(d*x + c)^3 - 87*sin(d*x
+ c)^2 + 39*sin(d*x + c) - 1)/(a*(sin(d*x + c) - 1)^3) - (75*sin(d*x + c)^4 + 396*sin(d*x + c)^3 + 786*sin(d*x
 + c)^2 + 556*sin(d*x + c) + 139)/(a*(sin(d*x + c) + 1)^4))/d

________________________________________________________________________________________

maple [A]  time = 0.39, size = 162, normalized size = 1.08 \[ -\frac {1}{96 a d \left (\sin \left (d x +c \right )-1\right )^{3}}-\frac {3}{128 a d \left (\sin \left (d x +c \right )-1\right )^{2}}+\frac {1}{128 a d \left (\sin \left (d x +c \right )-1\right )}-\frac {3 \ln \left (\sin \left (d x +c \right )-1\right )}{256 a d}-\frac {1}{64 a d \left (1+\sin \left (d x +c \right )\right )^{4}}+\frac {1}{24 a d \left (1+\sin \left (d x +c \right )\right )^{3}}-\frac {1}{64 a d \left (1+\sin \left (d x +c \right )\right )^{2}}-\frac {1}{32 a d \left (1+\sin \left (d x +c \right )\right )}+\frac {3 \ln \left (1+\sin \left (d x +c \right )\right )}{256 a d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(sec(d*x+c)^7*sin(d*x+c)^4/(a+a*sin(d*x+c)),x)

[Out]

-1/96/a/d/(sin(d*x+c)-1)^3-3/128/a/d/(sin(d*x+c)-1)^2+1/128/a/d/(sin(d*x+c)-1)-3/256/a/d*ln(sin(d*x+c)-1)-1/64
/a/d/(1+sin(d*x+c))^4+1/24/a/d/(1+sin(d*x+c))^3-1/64/a/d/(1+sin(d*x+c))^2-1/32/a/d/(1+sin(d*x+c))+3/256*ln(1+s
in(d*x+c))/a/d

________________________________________________________________________________________

maxima [A]  time = 0.36, size = 175, normalized size = 1.17 \[ -\frac {\frac {2 \, {\left (9 \, \sin \left (d x + c\right )^{6} + 9 \, \sin \left (d x + c\right )^{5} - 24 \, \sin \left (d x + c\right )^{4} + 72 \, \sin \left (d x + c\right )^{3} + 39 \, \sin \left (d x + c\right )^{2} - 25 \, \sin \left (d x + c\right ) - 16\right )}}{a \sin \left (d x + c\right )^{7} + a \sin \left (d x + c\right )^{6} - 3 \, a \sin \left (d x + c\right )^{5} - 3 \, a \sin \left (d x + c\right )^{4} + 3 \, a \sin \left (d x + c\right )^{3} + 3 \, a \sin \left (d x + c\right )^{2} - a \sin \left (d x + c\right ) - a} - \frac {9 \, \log \left (\sin \left (d x + c\right ) + 1\right )}{a} + \frac {9 \, \log \left (\sin \left (d x + c\right ) - 1\right )}{a}}{768 \, d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(d*x+c)^7*sin(d*x+c)^4/(a+a*sin(d*x+c)),x, algorithm="maxima")

[Out]

-1/768*(2*(9*sin(d*x + c)^6 + 9*sin(d*x + c)^5 - 24*sin(d*x + c)^4 + 72*sin(d*x + c)^3 + 39*sin(d*x + c)^2 - 2
5*sin(d*x + c) - 16)/(a*sin(d*x + c)^7 + a*sin(d*x + c)^6 - 3*a*sin(d*x + c)^5 - 3*a*sin(d*x + c)^4 + 3*a*sin(
d*x + c)^3 + 3*a*sin(d*x + c)^2 - a*sin(d*x + c) - a) - 9*log(sin(d*x + c) + 1)/a + 9*log(sin(d*x + c) - 1)/a)
/d

________________________________________________________________________________________

mupad [B]  time = 17.15, size = 388, normalized size = 2.59 \[ \frac {3\,\mathrm {atanh}\left (\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\right )}{64\,a\,d}+\frac {-\frac {3\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^{13}}{64}-\frac {3\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^{12}}{32}+\frac {7\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^{11}}{32}+\frac {17\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^{10}}{32}+\frac {387\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^9}{64}+\frac {43\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^8}{48}+\frac {299\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^7}{48}+\frac {43\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^6}{48}+\frac {387\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^5}{64}+\frac {17\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4}{32}+\frac {7\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3}{32}-\frac {3\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2}{32}-\frac {3\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{64}}{d\,\left (a\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^{14}+2\,a\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^{13}-5\,a\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^{12}-12\,a\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^{11}+9\,a\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^{10}+30\,a\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^9-5\,a\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^8-40\,a\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^7-5\,a\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^6+30\,a\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^5+9\,a\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4-12\,a\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3-5\,a\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2+2\,a\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )+a\right )} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(sin(c + d*x)^4/(cos(c + d*x)^7*(a + a*sin(c + d*x))),x)

[Out]

(3*atanh(tan(c/2 + (d*x)/2)))/(64*a*d) + ((7*tan(c/2 + (d*x)/2)^3)/32 - (3*tan(c/2 + (d*x)/2)^2)/32 - (3*tan(c
/2 + (d*x)/2))/64 + (17*tan(c/2 + (d*x)/2)^4)/32 + (387*tan(c/2 + (d*x)/2)^5)/64 + (43*tan(c/2 + (d*x)/2)^6)/4
8 + (299*tan(c/2 + (d*x)/2)^7)/48 + (43*tan(c/2 + (d*x)/2)^8)/48 + (387*tan(c/2 + (d*x)/2)^9)/64 + (17*tan(c/2
 + (d*x)/2)^10)/32 + (7*tan(c/2 + (d*x)/2)^11)/32 - (3*tan(c/2 + (d*x)/2)^12)/32 - (3*tan(c/2 + (d*x)/2)^13)/6
4)/(d*(a + 2*a*tan(c/2 + (d*x)/2) - 5*a*tan(c/2 + (d*x)/2)^2 - 12*a*tan(c/2 + (d*x)/2)^3 + 9*a*tan(c/2 + (d*x)
/2)^4 + 30*a*tan(c/2 + (d*x)/2)^5 - 5*a*tan(c/2 + (d*x)/2)^6 - 40*a*tan(c/2 + (d*x)/2)^7 - 5*a*tan(c/2 + (d*x)
/2)^8 + 30*a*tan(c/2 + (d*x)/2)^9 + 9*a*tan(c/2 + (d*x)/2)^10 - 12*a*tan(c/2 + (d*x)/2)^11 - 5*a*tan(c/2 + (d*
x)/2)^12 + 2*a*tan(c/2 + (d*x)/2)^13 + a*tan(c/2 + (d*x)/2)^14))

________________________________________________________________________________________

sympy [F(-1)]  time = 0.00, size = 0, normalized size = 0.00 \[ \text {Timed out} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(d*x+c)**7*sin(d*x+c)**4/(a+a*sin(d*x+c)),x)

[Out]

Timed out

________________________________________________________________________________________